public class PrintNameThread extends Thread {

	public PrintNameThread(String name) {
		super(name);
		start();
	}

	@Override
	public void run() {
		try {
			sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("My name is " + getName());
		
		

	}

}